package com.hunt.model.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 映射数据的地址：http://ddx.gubit.cn/top.html
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class DDXRankingMarket implements Comparable<DDXRankingMarket>{

    private String ranking;
    private String stockCode;
    private String stockName;
    private String latestPrice;
    private String ddx;
    private String hlPercent;
    private String industry;
    private String date;

    @Override
    public int compareTo(DDXRankingMarket o) {
        if ((Double.valueOf(o.getDdx()) >= Double.valueOf(this.getDdx()))){
            return 1;
        }else{
            return -1;
        }
    }
}
